package day1108.demo03;

/**
 * @author wql
 * @version 1.0
 * @date 2022/11/8 15:35
 */

public class TOne extends Thread{

    private volatile boolean flag=true;

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    @Override
    public void run() {
        System.out.println("进入run");
        while (flag){

        }
    }
}
